<!DOCTYPE html>
<html>
<head>
    {include file="Public/header"}
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
<div class="page-heade clearfix">
    <h2 class="clearfix text-center">
        <a href="{:url('cgindex')}" class="col-md-6 title_color H_right H_active"  style="display: inline-block;font-size: 16px">TI费用核销面单查询-常规</a>
        <a href="{:url('index')}" class="col-md-6 title_color" style="color:#333;font-size: 16px;display: inline-block;">TI费用核销面单查询-非常规和进场</a>
    </h2>
</div>
<!-- 标题 -->
<!--<div class="page-heade">
    <h1 class="title_color">TI费用核销面单查询</h1>
</div>-->
<!-- 标题 -->
<div class="row-margin-top">
    <form action="" class="form-inline"  id="form1">
        <table class="row-margin-top tab-content table-bordered  table" border="1">
            <tr>
                <td><label for="" class="form-label">面单编号：</label></td>
                <td><input type="text" class="form-control" name="sn" value="{$sn}"></td>
                <td><label for="" class="form-label">分区：</label></td>
                <td><input type="text" class="form-control" name="zoning" value="{$zoning}"></td>
                <td><label for="" class="form-label">省份：</label></td>
                <td><input type="text" class="form-control" name="provice" value="{$provice}"></td>
            </tr>
            <tr>
                <td><label for="" class="form-label">审批状态：</label></td>
                <td>
                    <select name="status" id="" class="form-control" style="min-width: 100px;width: 100px">
                        <option value="">请选择</option>
                        <option value="1" {if $status==1}selected{/if}>草稿</option>
                        <option value="2" {if $status==2}selected{/if}>已打回</option>
                        <option value="3" {if $status==3}selected{/if}>区域领导审批</option>
                        <option value="4" {if $status==4}selected{/if}>拆分人审批</option>
                        <option value="5" {if $status==5}selected{/if}>集团领导审批</option>
                        <option value="6" {if $status==6}selected{/if}>抄送</option>
                        <option value="7" {if $status==7}selected{/if}>已归档</option>
                        <option value="8" {if $status==8}selected{/if}>已作废</option>
                        <option value=9" {if $status==9}selected{/if}>已核销</option>
                    </select></td>
                <td><label for="" class="form-label">经销商名：</label></td>
                <td><input type="text" class="form-control" name="jxs_title" value="{$jxs_title}"></td>
                <td><label for="" class="form-label">申请人：</label></td>
                <td><input type="text" class="form-control" name="cusername" value="{$cusername}"></td>
            </tr>
            <tr>
                <td>
                    <div class="form-group">
                        申请时间
                    </div>
                </td>
                <td colspan="5">
                    <div class="form-group">
                        <input type="text" id="start" class="form-control layer-date "
                               style="width: 110px;min-width: 80px;display: inline-block;" name="end" value="{$start}" >
                    </div>
                    <div class="form-group">
                        至
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control layer-date"
                               style="width: 110px;min-width: 100px;display: inline-block;" id="end"
                               name="end" value="{$end}">
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="6" class="text-center">
                    <button class="btn btn-info query">查询</button>
                    <button class="btn btn-info emptyIf" type="button">清空查询条件</button>
                    <button class="btn btn-info LendExcel" type="button">导出Excel</button>
                </td>
            </tr>
        </table>
    </form>
        <table class="table table-striped row-margin-top table-bordered table-hover text-center" id="verifytable">
            <tr class="info text-center">
                <th class="text-center">NO.</th>
                <th class="text-center">编号</th>
                <th class="text-center">主题</th>
                <th class="text-center">核销金额</th>
                <th class="text-center">状态</th>
                <th class="text-center">申请人</th>
                <th class="text-center">申请时间</th>
                <th class="text-center">操作</th>
            </tr>
            <tbody>
            {volist name="data" id="row" key="k"}
            <tr>
                <td>{$k}</td>
                <td><a href="{:url('tihexiao/view',['id'=>$row.id])}">{$row.no}</a></td>
                <td class="text-left">
                    核销申请:{$row.jxs_title}
                    {if $row.state==7}
                    <span class="glyphicon glyphicon-ok duigou" title="已生效" aria-hidden="true"></span>
                    {/if}
                </td>
                <td>{$row.tax}</td>
                <td>{$row.status_title}</td>
                <td>{$row.cusername}</td>
                <td>{$row.ctime}</td>
                <td><a href="javascript:;">查看流程图</a></td>
            </tr>
            {/volist}
            </tbody>
        </table>

        <h5 class="text-center">
           {$page}
        </h5>


</div>
<!-- 全局js -->
{include file="Public/footer"}
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!--统计代码，可删除-->
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script>

    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY-MM-DD',
//        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY-MM-DD',
//        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
    $(document).ready(function () {
        // $("#verifytable tbody tr td").find('.duigou')
        var $duigou = $(".duigou");
        $duigou.parent().addClass("font-bold");
        $('.emptyIf').on('click',function () {
            $('#form1 input').each(function () {
                $(this).val('')
            })
            $('#form1 select').each(function () {
                $(this).val('')
            })
            $('#form1').submit()
        })
        $('.LendExcel').on('click',function () {
            var param = $('#form1').serialize()
            window.open('{:url("cgexcel")}?'+param)
        })
    })
</script>
</body>

</html>
